home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ED-157 / fixup_recs.c < prev    next >
C/C++ Source or Header  |  1993-09-10  |  1KB  |  44 lines

  1. /*
  2.  * Copyright (C) 1992 by Rush Record (rhr@clio.rice.edu)
  3.  * 
  4.  * This file is part of ED.
  5.  * 
  6.  * ED is free software; you can redistribute it and/or modify it under the terms
  7.  * of the GNU General Public License as published by the Free Software Foundation.
  8.  * 
  9.  * ED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  10.  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11.  * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  12.  * 
  13.  * You should have received a copy of the GNU General Public License along with ED
  14.  * (see the file COPYING).  If not, write to the Free Software Foundation, 675
  15.  * Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17. #include "opsys.h"
  18.  
  19. #include "rec.h"
  20. #include "window.h"
  21. #include "ed_dec.h"
  22.  
  23. /******************************************************************************\
  24. |Routine: fixup_recs
  25. |Callby: rec_insert rec_merge rec_trim
  26. |Purpose: Keep TOPREC,BOTREC, etc. in line when it is necessary to dump a record.
  27. |Arguments:
  28. |    old is the dumped record.
  29. |    new is the new record which takes its place.
  30. \******************************************************************************/
  31. void fixup_recs(old,new)
  32. rec_ptr old,new;
  33. {
  34.     if(old == TOPREC)
  35.         TOPREC = new;
  36.     if(old == BOTREC)
  37.         BOTREC = new;
  38.     if(old == CURREC)
  39.         CURREC = new;
  40.     if(old == NEWTOPREC)
  41.         NEWTOPREC = new;
  42. }
  43.  
  44.